package cn.wolfcode.domain;

import cn.wolfcode.qo.QuestionObject;
import lombok.*;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Exam {
    /**
     *
     */
    private Long id;

    /**
     * 试卷名称
     */
    private String title;

    /**
     * 考试时长
     */
    private Integer exam_minute;

    /**
     * 试卷总分
     */
    private Integer total_score;

    private List<QuestionObject> questions = new ArrayList<>();

    public Exam(String title, Integer exam_minute, Integer total_score) {
        this.title = title;
        this.exam_minute = exam_minute;
        this.total_score = total_score;
    }
    public Integer getCount(){
        return  questions.size();
    }

}